@using BlazorApp.Pages.Common.Metadata
@using BlazorApp.Pages.Event
@inherits BlazorApp.Pages.Common.DrawerPageBase<k8s.Models.V1Endpoints>
@if (Endpoints != null)
{
    <EndpointsAction Item="Endpoints" MenuMode="MenuMode.Horizontal"></EndpointsAction>
    <Divider Orientation="left" Style="font-weight:bold">@L["Metadata"]</Divider>
    <MetadataView Item="Endpoints.Metadata" ExplainFieldPrefix="endpoints"></MetadataView>
    @if (Endpoints.Subsets != null)
    {
        <EndpointsPortView Ports="@(Endpoints.Subsets.Where(x => x.Ports != null).SelectMany(x => x.Ports).ToList())"></EndpointsPortView>
        <EndpointAddressView
            Addresses="@(Endpoints.Subsets.Where(x => x.Addresses != null).SelectMany(x => x.Addresses).ToList())"
            Title=@L["Addresses"]>
        </EndpointAddressView>
        <EndpointAddressView
            Addresses="@(Endpoints.Subsets.Where(x => x.NotReadyAddresses != null).SelectMany(x => x.NotReadyAddresses).ToList())"
            Title=@L["NotReadyAddresses"]>
        </EndpointAddressView>
    }

    <MiniEventListView Uid="@Endpoints.Metadata.Uid"></MiniEventListView>
}
